<script type="text/javascript" src="js/jquery-form-2.33.js"></script>
<script type="text/javascript" src="js/jquery.pager.js"></script>
<link href="css/Pager.css" rel="stylesheet" type="text/css" />

<h1 class="title">我的订单</h1>
共有<em id="comment_count">${totalCount}</em>个订单
<table cellspacing="0" cellpadding="3" width="100%" class="liststyle">
	<col class="span-2 ColColorGray">
	<!--<col></col>-->
	<col class="span-3">
	<col class="span-2 ColColorOrange">
	<col class="span-3">
	<thead>
		<tr>
			<th>订单号</th>
			<th>下单日期</th>
			<th>总金额</th>
			<th>状态</th>
		</tr>
	</thead>
	<tbody class="division">
		<#include "Orders_Panel.html"> 
	</tbody>
</table>
<div id="pager" ></div>

<script>


var Pager = {
	init:function(){
		var self = this;
		var PC = 0;
		var em  =$("#comment_count");
		PC = (parseInt(em.text()) % ${pageSize} == 0) ? (parseInt(em.text()) / ${pageSize}): (parseInt(em.text()) / ${pageSize} + 1);
		if(PC!=0){
			$("#pager").pager({ pagerid:'pager',pagenumber: ${page}, pagecount: PC, buttonClickCallback: self.PageClick });
			//$("#pager").pager({ pagerid:'pager',pagenumber: 1, pagecount: 2, buttonClickCallback: self.PageClick });
		}
	},

	PageClick:function(pageclickednumber){
		var self = this;
		location.href="member_order.html?page="+pageclickednumber;
	}
}

$(function(){
	Pager.init();
});
</script>